# $Id$
# Maintainer: Rémy Oudompheng <remy@archlinux.org>

pkgname='perl-extutils-libbuilder'
_dist="ExtUtils-LibBuilder"
pkgver=0.08
pkgrel=4
pkgdesc="A tools to build C libraries"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
makedepends=('perl-module-build')
url="https://metacpan.org/release/${_dist}"
source=("http://search.cpan.org/CPAN/authors/id/A/AM/AMBS/${_dist}-${pkgver}.tar.gz")
sha1sums=('c15d93062c43bc83e1b3b0d52869bb0aa6919f2b')

build() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    perl Build.PL
    ./Build
}

check() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    ./Build test
}

package() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    ./Build install installdirs=vendor destdir="$pkgdir"
}
